#ifndef Poulty_H
#define Poulty_H
#include "Object.h"
#include "Egg.h"
#include "Shit.h"
#include "defines.h"
class Game;
class Poulty :
	public Object
{
protected:
	Egg *arrEggs [NUMBER_OF_EGGS];
	Shit *arrShits [NUMBER_OF_SHITS];
	int currentNumberofEggs;
	int currentNumberofShits;
	int currentState;
	int previousState;
	int currentAction;
	int previousAction;
	int lastTimeForMoving;
	double frameRateForMoving;
public:
	enum States{
		kNone,
		kInit,
		kEggFallDown,
		kShitFallDown,
		kUpdate
	};
	enum Action{
		kMoveLeft,
		kMoveRight,
		kUpdateAction
	};
	Poulty(SDL_Surface *screen = NULL/*Kieu Du Lieu cua thu vien SDL*/): Object(screen){ setType(KindOfObject::kPoulty); }
	Poulty(Game *game, const char *pathImage, double scaleRate);
	~Poulty();
	void draw();
	void update();
	void setState(int state){previousState = currentState; currentState = state;}
	void setAction(int action){previousAction = currentAction; currentAction = action;}
	void updateSpeedForAllofEggs();
	void updateSpeedForAllofShits();
};

#endif